<template>
  <ant-modal
    modalWidth="800"
    modalHeight="550"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model
      ref="form"
      :model="form"
      :rules="rules"
      slot="content"
      layout="vertical"
    >
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-item label="城市区域" prop="cityName">
            <a-select
              placeholder="所在城市"
              v-model="form.cityName"
              style="width: 100%"
              allow-clear
            >
              <a-select-option
                v-for="(d, index) in cityOptions"
                :key="index"
                :value="d.name.replace('市', '')"
                >{{ d.name }}</a-select-option
              >
            </a-select>
          </a-form-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="车辆状态" prop="carStatus">
            <a-select
              placeholder="请选择车辆状态"
              v-model="form.carStatus"
              :getPopupContainer="
                (triggerNode) => {
                  return triggerNode.parentNode || document.body;
                }
              "
              style="width: 100%"
              mode="multiple"
              allow-clear
            >
              <a-select-option
                v-for="(dict, index) in carStatusOptions"
                :key="index"
                :value="dict.dictValue"
                >{{ dict.dictLabel }}</a-select-option
              >
            </a-select>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="最低星级" prop="level">
            <a-select
              placeholder="请选择最低星级"
              v-model="form.level"
              :getPopupContainer="
                (triggerNode) => {
                  return triggerNode.parentNode || document.body;
                }
              "
              style="width: 100%"
              allow-clear
            >
              <a-select-option
                v-for="(dict, index) in levelOptions"
                :key="index"
                :value="dict.dictValue"
                >{{ dict.dictLabel }}</a-select-option
              >
            </a-select>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="跟进状态" prop="progress">
            <a-select
              placeholder="请选择跟进状态"
              v-model="form.progress"
              :getPopupContainer="
                (triggerNode) => {
                  return triggerNode.parentNode || document.body;
                }
              "
              style="width: 100%"
              mode="multiple"
              allow-clear
            >
              <a-select-option
                v-for="(dict, index) in progressOptions"
                :key="index"
                :value="dict.dictValue"
                >{{ dict.dictLabel }}</a-select-option
              >
            </a-select>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="最低评估价格" prop="pgPrice">
            <a-input-number
              v-model="form.pgPrice"
              :min="0"
              :max="10000"
              placeholder="最小值"
              :formatter="(value) => `${value}万`"
              :parser="(value) => value.replace('万', '')"
              :precision="1"
              style="width: 100%"
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="客户数量上限/天" prop="maxCount">
            <a-input-number
              v-model="form.maxCount"
              :min="0"
              style="width: 100%"
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="当日已分配客户数量" prop="shareCount">
            <a-input-number
              v-model="form.shareCount"
              :min="0"
              style="width: 100%"
              disabled
            />
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button @click="cancel"> 取消 </a-button>
      <a-button type="primary" @click="submitForm"> 保存 </a-button>
    </template>
  </ant-modal>
</template>
<script>
import BizCustomerFilterAddForm from "./BizCustomerFilterForm";
export default {
  ...BizCustomerFilterAddForm,
};
</script>
